import React, { Component } from 'react'

import netmap from './index.module.css'
import VideoCapture from '../../components/VideoCapture'


export default class index extends Component {
  constructor(props) {
    super(props)
    this.state = {
      videoUrl: ''
    }
  }
  getVideoUrl = (videoUrl) => {
    this.setState({videoUrl})
  }
  render() {
    return (
      <div className={netmap.container}>
        <div className={netmap.video_wrap}>
          <VideoCapture getVideoUrl={this.getVideoUrl}></VideoCapture>
        </div>
        <div className={netmap.video_wrap}>
          <video src={this.state.videoUrl} width="100%" height="100%" controls></video>
        </div>
      </div>
    )
  }
}